﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PartnersManager.ascx.cs" Inherits="Web.Cms.Partners.PartnersManager" %>
<script type="text/javascript">
    $(function () {
        $("#<%=txtDatefrom.ClientID %>").datepicker({ showOn: 'button', buttonImage: '/App_Themes/Default/Images/calendar_red.gif', buttonImageOnly: true, dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true });
        $("#<%=txtDateTo.ClientID %>").datepicker({ showOn: 'button', buttonImage: '/App_Themes/Default/Images/calendar_red.gif', buttonImageOnly: true, dateFormat: "dd/mm/yy", changeMonth: true, changeYear: true });
    });
</script>
<div class="rows">    
    <div class="fl width70"> <strong>Tên đối tác</strong></div>
    <div class="fl"><asp:TextBox ID="txtKeysearch" runat="server" Height="20px" CssClass="textbox-title"></asp:TextBox></div>
</div>

<div class="cl5"></div>
<div class="rows">
    <div class="fl width70" style="padding-top:5px;"> <b>Từ ngày</b></div>
    <div class="fl"><asp:TextBox ID="txtDatefrom" runat="server" Height="20px"></asp:TextBox></div>
    <div class="fl" style="padding-left:20px;padding-top:5px;"><b>Đến ngày</b></div>
    <div class="fl" style="padding-left:10px;"><asp:TextBox ID="txtDateTo" runat="server" Height="20px"></asp:TextBox></div>    
</div>
<div class="cl5"></div>
<div class="rows">
    <div class="fl width70">&nbsp;</div>
    <div class="fl"><asp:Button runat="server" ID="btnTimKiem" CssClass="Button_Search" OnClick="btnTimKiem_Click"/>
        <a href="javascript:void(0)" class="mar2" onClick="showPopWinADMIN('/Cms/Partners/AddEditPartner.aspx','Thông tin đối tác',540,350,null,null)"><img src="/App_Themes/Default/images/Add_b.gif" /></a>
    </div>
</div>
<div class="cl5"></div>
<div class="fl"><p class="heading">danh sách đối tác</p> </div>
<div class="cl5"></div>
<div class="rows">
    <div class="fl title-text"><asp:Label Font-Bold="true" ForeColor="red" Font-Size="11px" ID="lblMessage" runat="server"></asp:Label></div>
</div>

<div class="cl5"></div>
<asp:GridView ID="grdData" runat="server" SkinID="AdminGridView" 
    BackColor="White" AutoGenerateColumns="False" onrowcommand="grdData_RowCommand" >
    <Columns>               
         <asp:BoundField HeaderText="STT">
            <ItemStyle HorizontalAlign="Center" Width="20px" />
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle />
        </asp:BoundField>         
        <asp:BoundField HeaderText="Tên đối tác" DataField="name">            
        </asp:BoundField>                                             
        <asp:TemplateField HeaderText="Trạng thái">
            <ItemTemplate>       
            <%#Convert.ToInt32(Eval("Status")) ==1 ? "Bình thường":"Khóa" %>
            </ItemTemplate>
           <HeaderStyle Width="250px"></HeaderStyle>
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Ngày tạo">
            <ItemTemplate>       
            <%# Convert.ToDateTime(Eval("CreatedDate")).ToString("dd/MM/yyyy HH:mm:ss")%>
            </ItemTemplate>
           <HeaderStyle Width="250"></HeaderStyle>
           <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>                 
        <asp:TemplateField HeaderText="Sửa" HeaderStyle-Width="20">
            <ItemTemplate>                                                                
                <a href="javascript:void(0)" class="mar2" onClick="showPopWinADMIN('/Cms/Partners/AddEditPartner.aspx?Id=<%# Eval("Id") %>','Thông tin đối tác',540,350,null,null)"> <img src="/App_Themes/Default/Images/i_rate.gif" border="0" /></a>
            </ItemTemplate>

           <HeaderStyle Width="20px"></HeaderStyle>
        </asp:TemplateField>                   
        <asp:TemplateField HeaderText="Xóa" HeaderStyle-Width="20">
            <ItemTemplate>             
                <asp:Button ID="btnDelete" runat="server" CssClass="Icon_Delete" CommandArgument='<%# Eval("Id") %>' CommandName="Commanddelete" OnClientClick="return confirm('Bạn có chắc chắn xóa không ?')" />                   
            </ItemTemplate>

            <HeaderStyle Width="20px"></HeaderStyle>
        </asp:TemplateField>
    </Columns>
</asp:GridView>

